package cn.z2huo.knowledge.basic.keyword.extend;

class Student extends Person {

	public String name;
	public int age;

	public Student(String name, int age) {
		super(name, age);
		this.name = name;
		this.age = age;
		System.out.println("我是 Student 类");
	}

	public void say() {
		System.out.println("我叫 "+name+" 我岁数 "+age);
	}

	public void fatherNameAge() {
		System.out.println("father name is " + super.name + ", father age is " + super.age);
	}

	public static void main(String[] args) {
		Student student = new Student("张三", 18);
		System.out.println(student.age);
		System.out.println(student.name);
		student.fatherNameAge();
	}

}
